package com.infore.dataReceiving.enums;

/**
 * 日志与状态量枚举
 * @author Cold
 *
 */
public enum LogNameEnum {
	/** 分析仪日志 **/
	i11001("i11001","运行日志"),
	/** 分析仪状态 **/
	i12001("i12001","工作状态"),
	i12002("i12002","分析仪与数采仪通讯状态"),
	i12003("i12003","反应试剂余量"),
	i12031("i12031","分析仪报警状态"),
	/** 分析仪参数 **/
	i13001("i13001","测量量程"),
	i13002("i13002","测量精度"),
	i13003("i13003","测量间隔"),
	i13004("i13004","消解温度"),
	i13005("i13005","消解时长"),
	i13006("i13006","空白校准时间"),
	i13007("i13007","曲线截距"),
	i13008("i13008","曲线斜率"),
	i13009("i13009","测量检出限"),
	i13010("i13010","测量信号值"),
	i13011("i13011","线性相关系数（R²）"),
	i13012("i13012","二次多项式系数"),
	i13013("i13013","标准样校准时间"),
	/** 数采仪、工控机日志 **/
	i21001("i21001","运行日志"),
	/** 数采仪、工控机状态 **/
	i22001("i22001","工作状态"),
	i22002("i22002","用户状态"),
	i22003("i22003","数采仪与上位机通讯状态");

	
	private LogNameEnum(String code, String msg) {
		this.code = code;
		this.msg = msg;
	}

	private String code;
	
	private String msg;

	public String getMsg() {
		return msg;
	}
	public String getCode() {
		return code;
	}
	
	public static String getMsg(String code) {
    	for (LogNameEnum ls : LogNameEnum.values()) {
            if (ls.getCode().equals(code)) {
                return ls.getMsg();
            }
        }
    	return "";
    }
	
}
